﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Roboter
{
    class Obstacle
    {
        private int x1;

        public int X1
        {
            get { return x1; }
            set { x1 = value; }
        }
        private int x2;

        public int X2
        {
            get { return x2; }
            set { x2 = value; }
        }
        private int y1;

        public int Y1
        {
            get { return y1; }
            set { y1 = value; }
        }
        private int y2;

        public int Y2
        {
            get { return y2; }
            set { y2 = value; }
        }

        private bool isExit = false;

        public bool IsExit
        {
            get { return isExit; }
            set { isExit = value; }
        }

        public Obstacle(int x1, int y1, int x2, int y2)
        {
            this.x1 = x1;
            this.x2 = x2;
            this.y1 = y1;
            this.y2 = y2;
        }

        public Obstacle(int x1, int y1, int x2, int y2, bool isExit) : this(x1, y1, x2, y2)
        {
            this.IsExit = isExit;
        }

        public string ToString()
        {
            string ret = "Obstacle " + this.X1 + "," + this.Y1 + " | "  + this.X2 + "," + this.Y2;

            if (IsExit)
            {
                ret = ret + " EXIT ";
            }

            return ret;
        }
    }
}
